package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.service.HaiNingService;

import rx.Observable;
import rx.Subscriber;

public class CommentMethods extends BaseMethods {

    private static CommentMethods m_ins = null;

    public static CommentMethods getInstance() {
        if (m_ins == null) {
            synchronized (CommentMethods.class) {
                if (m_ins == null) {
                    m_ins = new CommentMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "Friend/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void dynamic_comment(Subscriber<Object> subscriber,
                      String uid  ,String hashid,String did,String content  ) {
        Observable observable = initService().dynamic_comment(System.currentTimeMillis()+"",
                "da944e8486b09b85761744a1c83d034e",uid ,hashid,did,content
        );
        toSubscribe(observable, subscriber);
    }
}
